package com.example.schooljava.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.NotNull;

/**
 * 接收课程获取参数
 *
 * @author: LDH
 * @date: 2022年08月25日 17:42
 */
@Data
@ApiModel(value = "接收课程新建表单", description = "")
public class CurriculumDTO {

    private String id;

    @ApiModelProperty("课程表中的年级属性")
    @NotNull(message = "年级不能为空！")
    @Range(min = 1, max = 6, message = "年级只能是1-6")
    private Integer grade;

    @ApiModelProperty("课程表中的课程名属性")
    @NotNull(message = "课程名不能为空！")
    @NotBlank(message = "课程名不能为空！")
    @Length(min = 1, max = 10, message = "课程名只能1-10个字")
    private String name;
}